package io.hepu.robotize.service.impl;

import io.hepu.robotize.base.BaseService;
import io.hepu.robotize.dao.PermissionMapper;
import io.hepu.robotize.model.Permission;
import io.hepu.robotize.service.IPermissionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PermissionService extends BaseService<Permission, String, PermissionMapper> implements IPermissionService {

    @Override
    public List<Permission> findByUserId(String userId) {
        return getResposity().selectByUserId(userId);
    }

    @Override
    public List<Permission> findByParentId(String parentId) {
        return getResposity().selectByParentId(parentId);
    }
}
